<%@ page pageEncoding="UTF-8" language="java" %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@ include file="common.jsp" %>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/backstyle/css/style51.css" type="text/css"></link>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/backstyle/css/mystyle_oa.css" type="text/css"></link>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/backstyle/css/style_oa.css" type="text/css"></link>
	<script type="text/javascript" src="${pageContext.request.contextPath}/backstyle/js/jquery-1.8.0.js"></script>
</head>
<body class="body_list">
	<table>
		<tr>
			<td valign="middle" align="center">
				<input type="button" name="deal" value="查看详情" onclick="javascript:my_deal()" class="button4">
				<input type="button" name="return" value="返回" onclick="javascript:my_back()" class="button2">
			</td>
		</tr>
	</table>
	<br/>
	<table border="1" bordercolor="#638ECE" cellpadding="3" class="table_list">
		<tr class="mid_bg">
			<td class="list_td2">客&nbsp;户&nbsp;号</td>
			<td class="list_td4">贷款申请号</td>
			<td class="list_td6">贷款种类</td>
			<td class="list_td4">贷款金额</td>
			<td class="list_td4">贷款期限</td>
			<td class="list_td4">审批意见</td>
			<td class="list_td6">机构名称</td>
			<td class="list_td2">选&nbsp;&nbsp;择</td>
		</tr>
		 <%
					int changbg = 0;
  		 %>
		<logic:iterate id="loanapp" name="loanappList" type="com.dingxin.entity.Loanapp">
		<tr
		<% if(((changbg+1)%2) == 0)
		    { out.print(" bgcolor=\"#E5F0F6\"");}
		   else
		   { out.print(" bgcolor=\"#FFFFFF\"");}
 
		%> 
		>
		    <td class="list_td2"><%=loanapp.getCifno()%></td>
		    <td class="list_td4"><%=loanapp.getAppno()%></td>
		    <td class="list_td6"><%=loanapp.getLoantype()%></td>
		    <td class="list_td4"><%=NumToString.numToCString(loanapp.getLoanamt())%></td>
		  	<td class="list_td4"><%=new MoneyOrDatetype().getYearOrMonth(loanapp.getLoantime())%></td>
		    <td class="list_td4"><%=loanapp.getAppidea()%></td>
		    <td class="list_td6"><%=loanapp.getOrgname()%></td>
			<td class="list_td2"><input  type="radio" name="select" onclick="javascript:myselect('<%=loanapp.getAppno()%>','<%=loanapp.getOrgno()%>')"></td>  
		</tr>
		<%
		   changbg++;
		%>
		</logic:iterate>
	</table>
	<table>
		<tr>
			<td><input type="hidden" name="appno_sel" value=""></td>
			<td><input type="hidden" name="orgno_sel" value=""></td>
			<td><input type="hidden" name="orgno_no" value=<%=request.getAttribute("orgno") %> ></td>
			<td><input type="hidden" name="appno_no" value=<%=request.getAttribute("appno") %> ></td>
			<td><input type="hidden" name="appstate_no" value=<%=request.getAttribute("appstate") %> ></td>
			<td><input type="hidden" name="pageSize" id="pageSize" value="<%=request.getAttribute("pageSize")%>"></td>
		</tr>
	</table>
	<!--分页必要start------->
	<table border="0" width="100%" bordercolor="#b3b5b0" align="center">
	 <% if(ipage.getResultCount() == 0) {
	  %>
	<tr ><td align="center"><span><b>没有您所查询的记录</b></span></td></tr>
	<%}else{ %>
	 <tr >
	 <td width="50%">
	 <span >第<%=ipage.getPageNo()%>页/共<%=ipage.getPageCount()%>页共<%=ipage.getResultCount()%>条记录</span>
	 每页显示<select onchange="goSeach(1)" id="countperpageselect" name="countperpageselect" style="width:80">
	 <option  value=10  >10</option>
	 <option  value=20 >20</option>
	 <option  value=50 >50</option>
	 <option  value=100 >100</option>
	 </select> 条记录
	 </td>
	 <td width="50%" align="right">
	   <a href="javascript:goSeach('<%=1%>')">首页</a>
	   <%if(ipage.isHasUpPage()){%>
	   <a href="javascript:goSeach('<%=ipage.getPageNo()-1%>')">上一页</a>
	   <%}if(ipage.isHasNextPage()){ %>
	   <a href="javascript:goSeach('<%=ipage.getPageNo()+1%>')">下一页</a>
	   <%} %>
	   <a href="javascript:goSeach('<%=ipage.getPageCount()%>')">尾页</a>
	     跳转到：<select name="pageNo" onchange="goSeach(this.value)">
	 <% for(int i = 1; i<ipage.getPageCount()+1;i++) {
	 if(i == ipage.getPageNo()){
	 %>
	  <option value='<%=i%>' selected><%=i%></option>
	 <%}else{ %>
	 <option value='<%=i%>'><%=i%></option>
	 <%}} %>
	</select>
	</td>
	</tr><%} %>
	</table>
	<!--分页必要end---------->
 </body>
 <script type="text/javascript" language="JavaScript1.2">
	if(<%=ipage.getResultCount()%>!=0){
	 	document.getElementById("countperpageselect").value=document.getElementById("pageSize").value;
	}
	function goSeach(page){
	     document.getElementById("pageSize").value=document.getElementById("countperpageselect").value;
	     var appno=document.all("appno_no").value;
		 var orgno=document.all("orgno_no").value;
		 var appstate=document.all("appstate_no").value;
	     var pageSize=document.getElementById("countperpageselect").value;
	     window.open("<%=request.getContextPath()%>/office/loanappListSearch.do?pageNo="+page+"&pageSize="+pageSize+"&appno="+appno+"&orgno="+orgno+"&appstate="+appstate,"_self","");
	}
</script> 
</html>
